In general, an inner-rotor-type motor includes a housing, a stator fixed to the housing, and a rotor provided in the stator. In particular, in a motor in which the rotor is a permanent magnet, a magnetic pole strength generated by the stator is controlled by detecting the magnetic pole position of the rotor in order to prevent a step-out and a synchronization loss. For this purpose, such a motor includes a sensor substrate on which a magnetic sensor such as a hall element is mounted. The sensor substrate is usually provided at a position axially spaced apart from the rotor. In order to enhance the accuracy of detection of the magnetic pole position of the rotor by the sensor substrate, the magnetic sensor and the rotor need to be spaced apart from each other by a certain distance. Because the rotor does not make a relative movement in the axial direction with respect to the housing, the magnetic sensor and the rotor can be spaced apart from each other by a certain distance by determining the relative position of the sensor substrate with respect to the rotor and fixing the sensor substrate to the housing.
However, if the sensor substrate is attached directly to the housing, a problem arises in that the durability of the sensor substrate is compromised. For example, if a motor as described above is used as the power source in an electric tool such as an impact driver, vibration occurs due to the environment or the operation of the motor itself. The vibration causes a stress concentration in the attachment portion where the sensor substrate and the housing are attached, which may compromise the durability of the sensor substrate.
For this reason, for example, Patent Literature 1 (PTL 1) discloses a structure for indirectly fixing a sensor substrate to a housing by fixing the sensor substrate to a stator and fixing the stator to the housing. The stator disclosed in PTL 1 includes a cylindrical stator core and an annular insulator provided on opposing sides in the axial direction of the stator core. An engagement projecting portion is provided on an outer circumferential surface of one of two insulators, and an engagement recess portion is provided on an inner circumferential surface of the housing. As a result of the engagement projecting portion and the engagement recess portion being fitted to each other, the stator is positioned with respect to the housing in the axial direction. PTL 1 also discloses a configuration in which an engagement recess portion is provided on the outer circumferential surface of one of the two insulators and an engagement projecting portion is provided on the inner circumferential surface of the housing. In either case, the sensor substrate is fixed to one of the two insulators that is used to position the stator with respect to the housing. This is to prevent the accuracy of positioning of the sensor substrate from lowering due to an error in the axial length of the stator core. In general, a stator core is composed of a stack of steel plates, and for this reason, the thickness of the stator core includes accumulated thickness errors of the steel plates. If the part of the insulator that is used to perform positioning with respect to the housing and the part of the insulator that is used to fix the sensor substrate are different, the sensor substrate is fixed not only to the insulator but also to the housing via the stator core. Accordingly, with the configuration, the relative position of the sensor substrate with respect to the housing in the axial direction varies due to an error in the axial length of the stator core, and the accuracy of positioning of the sensor substrate in the axial direction is lowered.